#ifndef __SERVERPRC_H__
#define __SERVERPRC_H__

#include "Giocp.h"

#define MAX_SERVEROBJECT 100

typedef struct
{
	int  Connected;
	char Ip[20];
	WORD Port;
	BYTE Type;
	char ServerName[51];

	WORD ServerCode;
	int pServer;
	int iMapSvrGroup;

	SOCKET m_socket;
	LPPER_SOCKET_CONTEXT	lpPerSocketContext;
	//PER_SOCKET_CONTEXT	PerSocketContext;
} ServerObject_Struct, * LPServerObject_Struct;

extern void  gSObjInit();
extern short gSObjAdd(SOCKET socket, char * ip);
extern short gSObjDel(int index);
extern BOOL  gSObjSetInfo(int aIndex, WORD port, int type, char * servername, WORD ServerCode);
extern int gSObjIndexSerrchbyServerCode(WORD ServerCode);

extern ServerObject_Struct	gSObj[];

#endif